
import http from '@/utils/http/axios'
import { RequestEnum } from '@/enums/httpEnum'

export function getSystemNoticeList(params) {
  return http.request(
    {
      url: `/ds/system/notice/list`,
      method: RequestEnum.POST,
      params
    }
  )
}

// 删除通知
export function postDelById(params) {
  return http.request(
    {
      url: `/ds/common/submit`,
      method: RequestEnum.POST,
      params
    },
    {
      successMessageText: '删除成功'
    }
  )
}
// 停用通知
export function postStopById(params) {
  return http.request(
    {
      url: `/ds/common/submit`,
      method: RequestEnum.POST,
      params
    },
    {
      successMessageText: '停用通知成功'
    }
  )
}
// 新增通知
export function postAddNotice(params) {
  return http.request(
    {
      url: `/ds/common/submit`,
      method: RequestEnum.POST,
      params
    },
    {
      successMessageText: '新增成功'
    }
  )
}

// 编辑通知
export function postUpdateNotice(params) {
  return http.request(
    {
      url: `/ds/common/submit`,
      method: RequestEnum.POST,
      params
    },
    {
      successMessageText: '修改成功'
    }
  )
}


// 获取学生状态列表
export function getActiveList(params) {
  return http.request(
    {
      url: `/ds/system/active/list`,
      method: RequestEnum.POST,
      params
    }
  )
}
// 激活
export function postActive(params) {
  return http.request(
    {
      url: `/ds/common/submit`,
      method: RequestEnum.POST,
      params
    },
    {
      successMessageText: '激活成功'
    }
  )
}

// 获取菜单
export function getMenu(params) {
  return http.request(
    {
      url: `/user/tree`,
      method: RequestEnum.POST,
      params
    }
  )
}
